package com.learn.spring.event.listener;

import com.learn.spring.event.order.PlaceOrderEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Service;

/**
 * 日志记录观察者
 *
 * @author cong zhi
 * @email 448341911@qq.com
 * @createDate 2023/3/20 16:38
 * @version: v1.0
 */
@Slf4j
@Service
public class OrderLogListener implements ApplicationListener<PlaceOrderEvent> {

    @Override
    public void onApplicationEvent(PlaceOrderEvent event) {
        log.info("[afterPlaceOrder] log.");
    }

}
